package info.marlan.sipgate.model;

import info.marlan.util.ConvertUtil;

import java.util.Date;


public class HistoryEntry {

	public static final String STATUSSTRING = "StatusString";
	public static final String HISTORY = "History";
	public static final String ENTRYID = "EntryID";
	public static final String TIMESTAMP = "Timestamp";
	public static final String TOS = "TOS";
	public static final String LOCALURI = "LocalUri";
	public static final String REMOTEURI = "RemoteUri";
	public static final String STATUS = "Status";
	public static final String STATUSCODE = "StatusCode";
	
	
	public static final String STATUSACCEPTED = "accepted";
	public static final String STATUSOUTGOING = "outgoing";
	public static final String STATUSMISSED = "missed";

	private String entryID;
	private Date timestamp;
	private String tOS;
	private String localUri;
	private String remoteUri;
	private String status;
	private int widgetId;
	
	private String phoneBookName;

	public String getPhoneBookName() {
		if(phoneBookName==null){
			return ConvertUtil.getBaseNumber(getRemoteUri());
		}
		return phoneBookName;
	}
	public void setPhoneBookName(String phoneBookName) {
		this.phoneBookName = phoneBookName;
	}
	public int getWidgetId() {
		return widgetId;
	}
	public void setWidgetId(int widgetId) {
		this.widgetId = widgetId;
	}
	public String getEntryID() {
		return entryID;
	}
	public void setEntryID(String entryID) {
		this.entryID = entryID;
	}
	public Date getTimestamp() {
		return timestamp;
	}
	public void setTimestamp(Date timestamp) {
		this.timestamp = timestamp;
	}
	public String gettOS() {
		return tOS;
	}
	public void settOS(String tOS) {
		this.tOS = tOS;
	}
	public String getLocalUri() {
		return localUri;
	}
	public void setLocalUri(String localUri) {
		this.localUri = localUri;
	}
	public String getRemoteUri() {
		return remoteUri;
	}
	public void setRemoteUri(String remoteUri) {
		this.remoteUri = remoteUri;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}

	
	
	
}
